/*
 * @Author: czy
 * @Date: 2021-05-21 14:30:38
 * @LastEditTime: 2021-05-21 16:39:55
 */
#include "sys/tick.h"

/**
 * @description: The timer is set to execute the function at a fixed time interval.
 * @param interval  Interval time.
 */
void timer(void (*func)(void), int interval)
{
    hook h = {0, interval, -1, func};
    submit(h);
}

/**
 * @description: Call the function after the specified millisecond count.
 * @param interval  Interval time.
 */
void setTimeout(void (*func)(void), int interval)
{
    hook h = {0, interval, 1, func};
    submit(h);
}
